<?php
return array(
    'controllers' => array(
        'invokables' => array(
            'UserApi\Controller\LoginUserApi' 	    	=> 	'UserApi\Controller\LoginUserApiController',	
			'UserApi\Controller\RegistrationApi'     	=>	'UserApi\Controller\RegistrationApiController',
			'UserApi\Controller\AddPostApi'	            =>	'UserApi\Controller\AddPostApiController',
			'UserApi\Controller\GetAlertsApi'	        =>	'UserApi\Controller\GetAlertsApiController',
			'UserApi\Controller\UpdateUserSettingsApi'  =>	'UserApi\Controller\UpdateUserSettingsApiController',
			'UserApi\Controller\GetListsApi'  			=>	'UserApi\Controller\GetListsApiController',
			'UserApi\Controller\SearchApi'  			=>	'UserApi\Controller\SearchApiController',
		),
    ),
    // The following section is new` and should be added to your file
    'router' => array(
        'routes' => array(		
            'registration' => array(
                'type'    => 'Segment',
                'options' => array(
                    'route'    => '/registration[/:id]',
                    'constraints' => array(
                        'id' => '[%&@*.;a-zA-Z0-9][%&@*.;a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        'controller' => 'UserApi\Controller\RegistrationApi',
                    ),
                ),
            ),
			
			'login' => array(
				'type'    => 'Segment',
				'options' => array(
					'route'    => '/login[/:id]',
					'constraints' => array(
						'id' => '[%&@*.;a-zA-Z0-9][%&@*.;a-zA-Z0-9_-]*',
					),
					'defaults' => array(
						'controller' => 'UserApi\Controller\LoginUserApi',
					),
				),
			),
			'add_post' => array(
				'type'    => 'Segment',
				'options' => array(
					'route'    => '/add_post[/:id]',
					'constraints' => array(
						'id' => '[%&@*.;a-zA-Z0-9][%&@*.;a-zA-Z0-9_-]*',
					),
					'defaults' => array(
						'controller' => 'UserApi\Controller\AddPostApi',
					),
				),
			),
			'get_alerts' => array(
				'type'    => 'Segment',
				'options' => array(
					'route'    => '/get_alerts[/:id]',
					'constraints' => array(
						'id' => '[%&@*.;a-zA-Z0-9][%&@*.;a-zA-Z0-9_-]*',
					),
					'defaults' => array(
						'controller' => 'UserApi\Controller\GetAlertsApi',
					),
				),
			),
			'update_user_settings' => array(
				'type'    => 'Segment',
				'options' => array(
					'route'    => '/update_user_settings[/:id]',
					'constraints' => array(
						'id' => '[%&@*.;a-zA-Z0-9][%&@*.;a-zA-Z0-9_-]*',
					),
					'defaults' => array(
						'controller' => 'UserApi\Controller\UpdateUserSettingsApi',
					),
				),
			),
			'get_lists' => array(
				'type'    => 'Segment',
				'options' => array(
					'route'    => '/get_lists[/:id]',
					'constraints' => array(
						'id' => '[%&@*.;a-zA-Z0-9][%&@*.;a-zA-Z0-9_-]*',
					),
					'defaults' => array(
						'controller' => 'UserApi\Controller\GetListsApi',
					),
				),
			),
			'search' => array(
				'type'    => 'Segment',
				'options' => array(
					'route'    => '/search[/:id]',
					'constraints' => array(
						'id' => '[%&@*.;a-zA-Z0-9][%&@*.;a-zA-Z0-9_-]*',
					),
					'defaults' => array(
						'controller' => 'UserApi\Controller\SearchApi',
					),
				),
			),	
        ),
    ),
    'view_manager' => array(
        'strategies' => array(
            'ViewJsonStrategy',
        ),
    ),
	
);